package com.example.demo.Service.Impl;

import com.example.demo.Bean.*;
import com.example.demo.Mapper.UserMapper;
import com.example.demo.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User queryUserByName(String username) {
        return userMapper.queryUserByName(username);
    }

    @Override
    public int insertUser(User user) {
        return userMapper.insertUser(user);
    }

    @Override
    public int updateUserIntegral(String username) {
        return userMapper.updateUserIntegral(username);
    }

    @Override
    public User getUserByName(String username) {
        return userMapper.getUserByName(username);
    }

    @Override
    public Shop getShopByName(String name) {
        return userMapper.getShopByName(name);
    }

    @Override
    public int insertShop(Shop shop) {
        return userMapper.insertShop(shop);
    }

    @Override
    public int getIntegralByUserName(String username) {
        return userMapper.getIntegralByUserName(username);
    }

    @Override
    public int insertSeckill(Seckill seckill) {
        return userMapper.insertSeckill(seckill);
    }

    @Override
    public List<UserOrders> getAllUserOrders(String username) {
        return userMapper.getAllUserOrders(username);
    }

    @Override
    public int updateUserOrderStatus(Integer id) {
        return userMapper.updateUserOrderStatus(id);
    }

    @Override
    public int insertComment(InsertComment insertComment) {
        return userMapper.insertComment(insertComment);
    }


}
